extends PlayerState


func unhandled_input(event: InputEvent):
	if event.is_action_pressed("ui_select"):
		state_machine.transition_to(state_machine.STATE.ATTACK)


func process(delta):
	player.facing_direction()
	
	if !player.is_on_floor():
		state_machine.transition_to(state_machine.STATE.JUMP_UP)


func physics_process(delta: float):
	player.physics_process(delta)
	if abs(player.direction.x) <= 0.01:
		state_machine.transition_to(state_machine.STATE.IDLE)


func enter(msg: Dictionary = {}):
	player.speed = player.run_speed
#	SheathTimer.connect("timeout", self, "sheath")
	animation.play(state_machine.STATE.RUN)

